<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <ul>
      <li>1</li>
      <li>2</li>
      <li>
        3
        <a href="#">aaaa</a>
      </li>
      <li>4</li>
    </ul>
    <p>5</p>
  </body>
</html>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
  //给li标签中的a标签设置边框，然后让所有的li设置上背景色
  $("li").find("a").css("border", "2px dashed blue");
  console.log($("li").find("a").css("border", "2px dashed blue")); //返回a元素
  //   end 返回当前集合的前一次状态
  console.log($("li").find("a").css("border", "2px dashed blue").end());
  $("li")
    .find("a")
    .css("border", "2px dashed blue")
    .end()
    .css("background", "pink");
</script>
